<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var a=prompt("请输入五个数字");
    function f(a) {
        if(a.length!=5){
            return false
        }
        var s1=a.substring(0,1);
        var s2=a.substring(1,2);
        var s3=a.substring(2,3);
        var s4=a.substring(3,4);
        var s5=a.substring(4,5);
        if(s1==s2&&s2==s3&&s3!=s4&&s4==s5){
            return true
        }else{
            return false
        }
    }
    document.write(f(a));
</script>
</body>
</html>